Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: combined task output to single stream to retain order #221

Merged
merged 5 commits into from
Oct 9, 2023

Conversation

shreddedbacon
Copy link
Member

@shreddedbacon shreddedbacon commented Jul 7, 2023

closes #220 (need testing)

@shreddedbacon shreddedbacon marked this pull request as ready for review September 28, 2023 22:35
@tobybellwood
Copy link
Member

This doesn't appear to work as expected:

Given the post-rollout task

    - 
      run:
        name: errors and output
        command: echo "test1" && echo "test2" 1>&2 && echo "test3" && echo "test4" 1>&2 && exit 1
        service: cli

Prior behaviour:

Failed to execute task `errors and output` due to reason `Error returned: command terminated with exit code 1`
*** Task STDOUT ***
 test1
test3
 
 *** STDOUT Ends ***
*** Task STDERR ***
 test2
test4
 
 *** STDERR Ends ***

PR behavoiur:

Failed to execute task `errors and output` due to reason `Error returned: command terminated with exit code 1`
*** Task output ***
 test1
test3
 
 *** output ends ***

@shreddedbacon shreddedbacon force-pushed the combined-stream branch 8 times, most recently from dd6e4ed to adb78b2 Compare September 29, 2023 10:55
@shreddedbacon
Copy link
Member Author

I did some runs with this and got differing results between build runs where sometimes stderr is before stdout, and others where stdout is before stderr.
image
image

@tobybellwood tobybellwood added this to the v2.16 tie-in release milestone Oct 3, 2023
Copy link
Member

@tobybellwood tobybellwood left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

retested working - echo only tasks run too quickly to discern order

@tobybellwood tobybellwood merged commit 8140f18 into main Oct 9, 2023
2 checks passed
@tobybellwood tobybellwood deleted the combined-stream branch October 9, 2023 02:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

STDOUT and STDERR are separated in dashboard logs
2 participants